package com.tsystems.school.jabber.DataBase.Entities;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Kirill
 * Date: 22.08.11
 * Time: 13:46
 * To change this template use File | Settings | File Templates.
*/
@Entity
@Table( name = "Conference" )
public class Conference extends ManagedEntity{

	@Column(name="name")
	private String name;

	@ManyToMany
    @JoinTable(name = "confuser",
    joinColumns = @JoinColumn(name = "conference_id"),
    inverseJoinColumns = @JoinColumn(name = "member_id"))
	private List<User> members = new ArrayList<User>();

	public Conference() {
	}

	public List<User> getMembers() {
		return members;
	}

	public void setMembers(List<User> members) {
		this.members = members;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
